#include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;

int main()
{
	vector<int> iv;
	int ci;
	while(cin >> ci)
	{
		iv.push_back(ci);
	}
	
	const vector<int>::size_type st = iv.size();	
	if(st % 2 != 0)
	{
		cout << "Not matched,\
			the single value is "
			<< iv[iv.size() - 1] << endl;
		return 0;
	}
	else 
	{
		for(vector<int>::size_type ix = 0; ix != st; ix += 2)
		{
			cout << iv[ix] + iv[ix + 1] << " ";
		}
		
		cout << endl;
		for(vector<int>::size_type ix = 0; ix != st >> 1; ix++)
		{
			cout << iv[ix] + iv[st - ix - 1] << " ";
		}
		cout << endl;
	}

	return 0;
}
